using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class CatheterInfoMap : EntityTypeConfiguration<CatheterInfo>
    {
        public CatheterInfoMap()
        {
            // Primary Key
            this.HasKey(t => t.CIID);

            // Properties
            this.Property(t => t.Patient_id)
                .HasMaxLength(50);

            this.Property(t => t.Create_User)
                .HasMaxLength(15);

            this.Property(t => t.MerName)
                .IsRequired()
                .HasMaxLength(30);

            this.Property(t => t.Fvalue)
                .HasMaxLength(30);

            this.Property(t => t.Information)
                .HasMaxLength(200);

            this.Property(t => t.No_content)
                .HasMaxLength(50);

            this.Property(t => t.Target_Postion)
                .HasMaxLength(50);

            this.Property(t => t.Target_Postion_2)
                .HasMaxLength(50);

            this.Property(t => t.label)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("CatheterInfo");
            this.Property(t => t.CIID).HasColumnName("CIID");
            this.Property(t => t.Patient_id).HasColumnName("Patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.MID).HasColumnName("MID");
            this.Property(t => t.MNID).HasColumnName("MNID");
            this.Property(t => t.To_CID).HasColumnName("To_CID");
            this.Property(t => t.Target_ID).HasColumnName("Target_ID");
            this.Property(t => t.Create_User).HasColumnName("Create_User");
            this.Property(t => t.Create_Time).HasColumnName("Create_Time");
            this.Property(t => t.MerName).HasColumnName("MerName");
            this.Property(t => t.Fvalue).HasColumnName("Fvalue");
            this.Property(t => t.OPS_Time).HasColumnName("OPS_Time");
            this.Property(t => t.Information).HasColumnName("Information");
            this.Property(t => t.Ljsc).HasColumnName("Ljsc");
            this.Property(t => t.No_content).HasColumnName("No_content");
            this.Property(t => t.Target_Postion).HasColumnName("Target_Postion");
            this.Property(t => t.Target_Postion_2).HasColumnName("Target_Postion_2");
            this.Property(t => t.label).HasColumnName("label");
        }
    }
}
